<div id="blueBar"></div>
<div id="globalContainer">
	<?php echo $this->render("navigation.phtml");?>
	<div id="content" class="hasLeftCol">
		<div id="contentCol" class="hasRightCol">
			<div id="rightCol" >
				<div class="name-page-cms">	Thống kê lớp học trên hệ thống
				</div>
			</div>
			<div id="contentArea">
				<div class="statistic-table">
					<table class="table-test">
						<tr>
							<th colspan="2" style="text-align: left;">Ngày thống kê: <?php echo date("d-m-Y G:i")?> 
							</th>
							<th colspan="2" style="text-align: right;"><a href="<?php echo BASE_URL;?>/statisticsystem/exportwordstatisticclass"><img class="fugue fugue-printer--pencil" alt="" src="<?php echo BASE_URL;?>/img/icons/space.gif"/>&nbsp;&nbsp;Xuất ra word </a> 
							</th>
						</tr>
						<tr>
							<th colspan="2" style="text-align: left;">Người thống kê: <?php
									$auth = Zend_Auth::getInstance();
									if ($auth->hasIdentity())
							  			$userhaslogin = $auth->getStorage()->read();  		
									echo $userhaslogin->firstname." ".$userhaslogin->lastname;	
									?>
							</th>
							<th colspan="2" style="text-align: right;"><a href="<?php echo BASE_URL;?>/statisticsystem/exportexcelstatisticclass"><img class="fugue fugue-printer--pencil" alt="" src="<?php echo BASE_URL;?>/img/icons/space.gif"/>&nbsp;&nbsp;Xuất ra Excel </a> 
							</th>
						</tr>
						<tr>
							<th colspan="5" class="head-title-th">Có <?php echo $this->dataStatistic['total'];?> lớp học trên hệ thống và <?php echo $this->dataStatistic['totalStudentJoin'];?> sinh viên tham gia học 
							</th>
						</tr>
						<tr>
							<td colspan="5"><hr/></td>
						</tr>
						<tr>
							<td class="statistc-title-subject">Lớp học đang mở có: <?php echo $this->dataStatistic['OnClass']['totalClassOn'];?> lớp
							</td>
							<td class="statistc-title-subject">Số sinh viên tham gia: <?php echo $this->dataStatistic['OnClass']['amountStudentInClassOn'];?> sinh viên
							</td>
						</tr>
						<tr>
							<td colspan="5">
								<table>
									<?php if(count($this->dataStatistic['OnClass']['BigObjClassOn'])>0)
										foreach($this->dataStatistic['OnClass']['BigObjClassOn'] as $keyOn=>$objClassOn){
									?>
									<tr>
										<td> Lớp <?php echo $objClassOn['ObjClassOn']['full_name']; ?>
										</td>
										<td> Có <?php echo $objClassOn['AmountStudent']; ?> lượt sinh viên tham gia
										</td>
										<td>
											<a href="<?php echo BASE_URL;?>/statisticsystem/exportwordstudentclass/class_id/<?php echo $objClassOn['ObjClassOn']['id'];?>">
											<img class="fugue fugue-printer--pencil" alt="" src="<?php echo BASE_URL;?>/img/icons/space.gif"/>&nbsp;&nbsp;Xuất danh sách ra word </a>
										</td>
									</tr>
									<?php } ?>
								</table>
							</td>
						</tr>
						<tr>
							<td class="statistc-title-subject">Lớp học đã đóng có: <?php echo $this->dataStatistic['OffClass']['totalClassOff'];?> lớp
							</td>
							<td class="statistc-title-subject">Số sinh viên tham gia: <?php if (isset($this->dataStatistic['OffClass']['amountStudentInClassOff'])) echo $this->dataStatistic['OffClass']['amountStudentInClassOff']; else echo "0";?> sinh viên
							</td>
						</tr>
						<tr>
							<td colspan="5">
								<table>
									<?php if(count($this->dataStatistic['OffClass']['BigObjClassOff'])>0)
										foreach($this->dataStatistic['OffClass']['BigObjClassOff'] as $keyOn=>$objClassOff){
									?>
									<tr>
										<td> Lớp <?php echo $objClassOff['ObjClassOff']['full_name']; ?>
										</td>
										<td> Có <?php echo $objClassOff['AmountStudent']; ?> lượt sinh viên tham gia
										</td>
										<td>
											<a href="<?php echo BASE_URL;?>/statisticsystem/exportwordstudentclass/class_id/<?php echo $objClassOff['ObjClassOff']['id'];?>">
											<img class="fugue fugue-printer--pencil" alt="" src="<?php echo BASE_URL;?>/img/icons/space.gif"/>&nbsp;&nbsp;Xuất danh sách ra word </a>
										</td>
									</tr>
									<?php } ?>
								</table>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
